home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / patches / itf201.lha / Infocom / History.txt < prev    next >
Text File  |  1993-09-21  |  56KB  |  1,450 lines

  1. The InfoTaskForce Infocom Interpreter Modification History.
  2. ===========================================================
  3. Copyright (c) 1992 InfoTaskForce
  4.  
  5.  
  6. REV_A - May 25, 1987.
  7. ---------------------
  8.  
  9. *    Original version of the Infocom Standard Series Interpreter. This 
  10.     was compiled on a 128K Apple Macintosh using Aztec C Version 
  11.     1.06F.
  12.  
  13.  
  14.  
  15. REV_B - June 1, 1987.
  16. ---------------------
  17.  
  18. *    The Interpreter was ported to Lightspeed C Version 2.01 on a 
  19.     128K Apple Macintosh, an IBM PC on Microsoft C Version 4 and a 
  20.     VAX 11/780 running UNIX Version 7. These ports revealed some 
  21.     non-portable constructs in the code.
  22.  
  23. *    In file.c    : fix for byte order (within word) problem.
  24.  
  25. *    In infocom.h    : added a few new definitions and extra 
  26.               comments.
  27.  
  28. *    In io.c        : fix for type mismatch (coersion added).
  29.  
  30. *    In jump.c    : fix for an attempt to use a negative number when 
  31.               stored as an unsigned.
  32.  
  33. *    In infocom.c    : add command line processing for cheat modes.
  34.  
  35. *    Added object.che: A replacement for object.c, allowing two 
  36.               "cheat" modes which can be invoked from the command
  37.               line.
  38.  
  39. *    In print.c    : fix for errors that occured when an "int" is not 16 
  40.               bits.
  41.  
  42. *    In page.c    : fix for a problem in the "fix_pc ()" function that 
  43.               occured when an int and short aren't the same size.
  44.  
  45. *    Added debug.c    : A replacement for interp.c with debugging 
  46.               code built in - produces an instruction trace.
  47.  
  48.  
  49. Machine        C Compiler        Operational    Porting details
  50.  
  51. 128K Apple 
  52. Macintosh    Aztec C Version 1.06F    18/05/87    
  53.  
  54. 128K Apple 
  55. Macintosh    Lightspeed C 2.01    29/05/87    Use "rb" & 
  56.                             "wb" in all 
  57.                             fopen()s
  58.  
  59. IBM PC/AT    Microsoft C 4        30/05/87    Link with 
  60.                             binmode.obj
  61. DEC VAX 11/780    UNIX V7 cc        01/06/87    
  62.  
  63.  
  64.  
  65. REV_C - June 2, 1987.
  66. ---------------------
  67.  
  68.  
  69. *** This is the incomplete version which was released on the Internet ***
  70. ***                  (not by InfoTaskForce)                           ***
  71.  
  72. *    Nine more cases of faulty coersion have been found. They showed 
  73.     up quite graphically on the port to an HP 9000 UNIX machine. 
  74.     "signed_word" coersions were added to the following three files: 
  75.     funcs.c, print.c and variable.c.
  76.  
  77.  
  78.  
  79. REV_D - June 16, 1987.
  80. ----------------------
  81.  
  82. *    Fix one remaining byte order within word problem in "restore ()".
  83.  
  84. *    Remove checking on the "fread ()" in "load_page ()" to remove a 
  85.     "Failed to Read Block from File" error when the last block wasn't 
  86.     a full 512 bytes long (they need not be).
  87.  
  88.  
  89.  
  90. REV_E - June 25, 1987.
  91. ----------------------
  92.  
  93. REV_E is the first major overhaul to the interpreter.
  94.  
  95. *    The source is now significantly lint free.
  96.  
  97. *    TERMCAP support has now been added [#define TERMCAP option].
  98.  
  99. *    Screen paging and word wrap has been added, along with a new 
  100.     command line option which disables screen paging (-p).
  101.  
  102. *    Random number generator seeding using time () added [#define 
  103.     TIMESEED option].
  104.  
  105. *    Attributes in the object list are listed as bits.
  106.  
  107. *    A debuging version can now be produced as an inbuilt options
  108.     [#define DEBUG option].
  109.  
  110. *    The coded requirement that 25k is always free in the system can 
  111.     now be removed [#define ALLOCALL option].
  112.  
  113. *    A new command line option was added to print the object/room list 
  114.     as a tree (-r).
  115.  
  116. *    interp.c has been re-written to improve efficiency [large 
  117.     switches have been replaced with arrays of pointers to funcions].
  118.  
  119. There are now 14 machines on the porting list:
  120.  
  121. Machine        C Compiler        Operational    Porting details
  122.  
  123. 128K Apple 
  124. Macintosh    Aztec C Version 1.06F    18/05/87    
  125.  
  126. 128K Apple 
  127. Macintosh    Lightspeed C 2.01    29/05/87    Use "rb" & 
  128.                             "wb" in all 
  129.                             fopen()s
  130.  
  131. IBM PC/AT    Microsoft C 4        30/05/87    Link with 
  132.                             binmode.obj
  133.  
  134. DEC VAX 11/780    UNIX V7 cc        01/06/87    
  135.  
  136. HP-9000    HP-UX    cc            02/06/87    
  137.  
  138. gould        cc            03/06/87    
  139.  
  140. Amiga        Aztec C            04/06/87    
  141.  
  142. Pyramid 9810    cc            04/06/87    
  143.  
  144. Pyramid 90x    cc            04/06/87    
  145.  
  146. Osiris        cc            05/06/87    
  147.  
  148. DEC PDP-11/?    UNIX V? cc        07/06/87    EXTENSIVE 
  149.                             mods to fix 
  150.                             problems with 
  151.                             signed chars.
  152.  
  153. VAX VMS        cc            16/06/87    Add #define 
  154.                             times ttmes to 
  155.                             fix multiply 
  156.                             defined symbol 
  157.                             problem. 
  158.                             [infocom.h]
  159.  
  160.  
  161. Version 1.00 - August 17, 1987.
  162. -------------------------------
  163.  
  164. The REV_C interpreter of June 2, 1987 was officially archived as 
  165. Version 1.00 on August 17, 1987.
  166.  
  167.  
  168.  
  169. Version 2.00 - April 4, 1988.
  170. -----------------------------
  171.  
  172. [Note: Version 2.00 of the interpreter was derived from the 
  173. REV_E version of the interpreter. The REV_E save/restore bug is 
  174. fixed with Version 2.00. However, the following modification list 
  175. shows the differences between Version 1.00 and Version 2.00, not 
  176. the differences between REV_E and Version 2.00]
  177.  
  178. *** The STANDARD Interpreter is finally complete ***
  179.  
  180. *    Merged file debug.c with interp.c (debug.c no longer exists - 
  181.     DEBUG can now be #defined).
  182.  
  183. *    Merged file object.che with object.c (object.che no longer exists 
  184.     - CHEAT can now be #defined).
  185.  
  186. *    Renamed function.c to funcs.c (filename was too big for some 
  187.     operating systems).
  188.  
  189. *    Renamed makefile to unix.mk and added unix support to the 
  190.     makefile.
  191.  
  192. *    Introduced term.c. This file contains the UNIX TERMCAP 
  193.     interface routines.
  194.  
  195. *    In file.c, the save and restore routines were completely 
  196.     rewritten. The old version saved only the save_blocks area of the 
  197.     data file, while the new version also saves the current values of 
  198.     the interpreter pc_page, pc_offset, stack pointer, 
  199.     stack_var_pointer and stack array. The size of the save file name 
  200.     was increased from 10 characters to 80 characters.
  201.  
  202. *    In infocom.c, the "main ()" routine was modified to support two 
  203.     new options - print object tree and page out (disable the 
  204.     [MORE] function). Some global variables have also been removed 
  205.     to other files.
  206.  
  207. *    In infocom.h, the macro "max_mem" was changed from 0xFFFF to 
  208.     0xFE00 (that is, to a multiple of the block size 0x0200). The 
  209.     macros "dmx_scrx" and "mx_scry" have been introduced - they 
  210.     are the default line width and default screen height respectively.
  211.  
  212. *    In init.c, the "init ()" routine was rewritten. Many of the global 
  213.     variables were not needed. The interpreter stack is now a 
  214.     predefined global array and is not obtained from the block of 
  215.     memory obtained by "allocate ()". The new routines "init_io ()" 
  216.     and "init_status ()" are also called from here.
  217.  
  218. *    In input.c, the "input ()" routine was modified to reset the line 
  219.     count for every new line of input.
  220.  
  221. *    The routines in interp.c were completely rewritten - they now use 
  222.     arrays of function pointers instead of large case statements to 
  223.     execute the various opcode functions.
  224.  
  225. *    In io.c, the "init_io ()" routine was added to initialise any I/O 
  226.     variables (specifically the UNIX TERMCAP variables). The 
  227.     "cr_print_buffer ()" routine was added, allowing the "print_buffer 
  228.     ()" routine to be greatly simplified (it was actually quite a
  229.     mess!).
  230.  
  231. *    In io.c, the "out_char ()" routine has been changed to include 
  232.     the "page_out" option and to use the "mx_scry" variable
  233.     (current number of screen lines).
  234.  
  235. *    In io.c, the "allocate ()" routine now returns the number of 
  236.     bytes allocated. It also uses increments of 256 bytes instead of 1 
  237.     Kbytes and preserves 24 Kbytes for system use instead of 25 
  238.     Kbytes. This memory is no longer preserved if ALLOCALL is 
  239.     defined.
  240.  
  241. *    In io.c, the "seed_random ()" routine now uses the C library 
  242.     "time ()" function to seed the random number generator if 
  243.     TIMESEED is defined.
  244.  
  245. *    In options.c, the "out_char ()" routine is now used to print new 
  246.     line characters rather than using printf. "words_per_line" is now 
  247.     calculated from the current line length "mx_scrx" rather than 
  248.     #defined. The total number of entries in the object/room list is 
  249.     now correctly calculated using the start of the first object's 
  250.     property list (instead of blindly assuming that there are always 
  251.     256 objects).
  252.  
  253. *    In options.c, the "bit_byte ()" routine was added to show an 
  254.     object's properties as bits rather than as a hexadecimal number. 
  255.     New routines were added ("show_tree ()" and "obtree ()") to 
  256.     display the data file's object/room list in a tree format.
  257.  
  258. *    The global variables "page_strt" and "strt_page_table" were moved 
  259.     from init.c to page.c. The page table initialisation code was also 
  260.     moved from init.c and put in the new "init_page ()" routine in 
  261.     page.c.
  262.  
  263. *    In print.c, changed some calls from "print_buffer ()" to 
  264.     "cr_print_buffer ()".
  265.  
  266. *    In print.c, introduced the status routine global variables and the 
  267.     "init_status ()" routine which initialises them.
  268.  
  269. *    In print.c, the "show_score ()" routine now checks the data file's 
  270.     header directly for the "score_or_time" information rather than 
  271.     use a preset global variable. This routine is now aware of the 
  272.     line length via the "mx_scrx" variable instead of always assuming 
  273.     80 columns. The status buffer no longer puts the status buffer 
  274.     size in the first byte of the buffer (since this was never used 
  275.     anyway).
  276.  
  277. *    In support.c, the "quit ()" routine was modified to remove the 
  278.     superfluous request for the user to hit return before leaving the 
  279.     game.
  280.  
  281.  
  282.  
  283. Version 2.50 - Date Unknown.
  284. ----------------------------
  285.  
  286. *** This is the first version to include PLUS Interpreter Routines ***
  287.  
  288. *    Renamed unix.mk to makefile.
  289.  
  290. *    Renamed funcs.c to fns.c.
  291.  
  292. *    Introduced machine.h, globals.c, message.c, plus_fns.c and 
  293.     status.c (the status routines were removed from print.c into 
  294.     status.c).
  295.  
  296. *    Made some variables register variables.
  297.  
  298. *    Introduced the "read_string" and "write_string" macros because 
  299.     Lightspeed C and Microsoft C require files to be explicitly opened 
  300.     in binary mode: "rb" and "wb".
  301.  
  302. *    Change the name of the "score_or_time" byte in the header to 
  303.     "mode_bits".
  304.  
  305. *    Renamed "save ()" to "save_game ()" and "restore ()" to 
  306.     "restore_game ()".
  307.  
  308. *    Moved global variables from infocom.c to globals.c, io.c, input.c, 
  309.     message.c and print.c.
  310.  
  311. *    Introduced the macros "prop_mask" and "mode_mask" due to the 
  312.     introduction of the PLUS interpreter.
  313.  
  314. *    In object.c, added code to handle the PLUS interpreter versions 
  315.     of "transfer ()", "remove_obj ()", "get_loc ()", "get_holds ()", 
  316.     "get_link ()" and "check_loc ()". Added "#ifdef CHEAT" to most 
  317.     functions and specified some variables as "register". In "test_attr 
  318.     ()", "set_attr ()" and "clr_attr ()", changed the variable "bit" to 
  319.     "attr_bit" - there was a reason for this but I can't remember 
  320.     what.
  321.  
  322. *    In property.c, added code to handle the PLUS interpreter 
  323.     versions of "next_addr ()", "get_prop_addr ()" and "get_p_len 
  324.     ()". Also specified some variables as "register" and in some 
  325.     functions, combined multiple statements into single statements.
  326.  
  327. *    Moved some initialisation code out of init.c and put it in 
  328.     "init_input ()" in input.c.
  329.  
  330. *    Moved the "print_coded ()", "decode ()" and "letter ()" functions 
  331.     from print.c to message.c. Also moved "encode ()", "find_mode 
  332.     ()" and "convert ()" from input.c to message.c.
  333.  
  334. *    Deleted the function "init_status ()" from print.c and moved the 
  335.     functions "show_score ()" { now called "show_status ()" with a 
  336.     different parameter list }, "put_status ()" and "copy_string ()" 
  337.     from print.c to status.c. Also added the function "prt_status ()" 
  338.     which calls "show_status ()" to print.c.
  339.  
  340. *    Rewrote "cr_print_buffer ()" and "print_buffer ()" - changed the 
  341.     parameter lists.
  342.  
  343. *    Added "init_print ()" and "flush_prt_buff ()" to print.c. Also 
  344.     added code to "print2 ()" to handle the PLUS interpreter version.
  345.  
  346. *    Redefined the page table structure in infocom.h. Rewrote all the 
  347.     functions in page.c to conform with the new page table structure 
  348.     definition. Used a new method to calculate "pc" in "fix_pc ()".
  349.  
  350. *    Changed the way the command line options are handled. Instead 
  351.     of each being a boolean, they are now different bit positions in 
  352.     an "options" variable.
  353.  
  354. *    In options.c, changed all occurrences of "out_char ( '\n' )" to 
  355.     "new_line ()" so that the output from the options use the MORE 
  356.     facility correctly. Also added code to "show_objects ()", 
  357.     "show_tree ()" and "obtree ()" to handle the PLUS version of the 
  358.     object list. The "show_header ()" function now knows about 
  359.     "mode_bits" and "script_status".
  360.  
  361. *    Changed the definition of "true" from "1" to "!false".
  362.  
  363. *    Revamped the "allocate ()" routine - it now returns a long 
  364.     instead of an unsigned int. Added the "LONG_ALLOCATE" 
  365.     option.
  366.  
  367. *    Merged the TERMCAP functions from term.c into io.c (term.c no 
  368.     longer exists).
  369.  
  370. *    In jump.c, completely rewrote the "gosub ()" routine. PLUS 
  371.     series code was added (the "pc_page" and "pc_offset" values are 
  372.     calculated differently). The parameters to "gosub ()" have been 
  373.     removed - it now uses the "param_stack[]" array instead for 
  374.     receiving its parameters.
  375.  
  376. *    During a subroutine call, the current "stack_var_ptr" offset 
  377.     which is pushed onto the stack is now a positive offset from the 
  378.     "stack_base" rather than a negative one.
  379.  
  380. *    In jump.c, added PLUS series comments to the "rtn ()" opcode.
  381.  
  382. *    In infocom.h, removed the "max_mem" macro and the default 
  383.     screen size macros "dmx_scrx" and "dmx_scry". Added macros 
  384.     "max_params", "table_size", "max_line_length", 
  385.     "max_PageTable_size" and "encoded_size". Added macros for 
  386.     "z_interp", "stack_size", "chars_per_word", "obj_size", 
  387.     "obj_offset", "plus_error_1" and "plus_error_2" for the PLUS 
  388.     series interpreter. Changed the structure definitions of "object" 
  389.     and "header" for the PLUS series interpreter.
  390.  
  391. *    In "init ()", more rigourous checks were added to the memory 
  392.     allocation code. A check is now made to ensure that there is 
  393.     enough room for the resident blocks and at least two data pages. 
  394.     It does not use the "status" global variable to determine the 
  395.     success or failure of the allocation code.
  396.  
  397. *    The "init ()" function no longer calls "init_io ()". This is now 
  398.     done by "init_print ()" as "init_io ()" now returns the length of 
  399.     a screen line.
  400.  
  401. *    The space used by "p_buff_strt" (the print buffer) and 
  402.     "ws_buff_strt" (the white_space buffer) are no longer allocated 
  403.     from allocated memory. They are now fixed global arrays allocated 
  404.     at compile time.
  405.  
  406. *    Moved the function prototypes and opcode jump tables from 
  407.     interp.c to globals.c.
  408.  
  409. *    The "interp ()" function now includes support for the PLUS 
  410.     series data file header and uses "init_print ()" rather than 
  411.     manipulate the print routine variables directly.
  412.  
  413. *    In "interp ()", renamed the local debug variable "pc" to 
  414.     "debug_pc" to avoid confusion with the "pc" global variable in 
  415.     globals.c. The debug code now uses "new_line ()" in order to use 
  416.     the [MORE] facility correctly.
  417.  
  418. *    In interp.c, code was changed to use the new "param_stack[]" 
  419.     and "operands[]" arrays instead of separate parameter variables. 
  420.     The "push_params ()" function was introduced to manipulate the 
  421.     parameter stack.
  422.  
  423. *    Changed the "input ()" routine from using two parameters which 
  424.     were explicitly passed to it to using the "param_stack[]" array. 
  425.     Also changed the "show_score ()" call to a "prt_status ()" call 
  426.     which is only compiled if the macro PLUS is not defined. The 
  427.     "flush_prt_buff ()" routine is also used, instead of calling the 
  428.     equivalent routines explicitly.
  429.  
  430. *    Fixed a bug in the "read_line ()" routine. Previously, if a 
  431.     backspace was typed and there was no character in the buffer, 
  432.     this routine would go into an infinite loop since "read_char ()" 
  433.     was never called for this special case to break it out of the loop.
  434.  
  435. *    Rewrote the "look_up ()" function used by "parse ()" routine to 
  436.     make it more general. Instead of updating the "word_ptr" array, 
  437.     it does the more general function of returning the offset value 
  438.     which is to be stored in the "word_ptr" array and leaves the 
  439.     actual storing of the value to "parse ()". "parse ()" also calls 
  440.     "encode ()", rather than allowing "look_up ()" to do it. The 
  441.     global array "coded[]" is now a local variable.
  442.  
  443. *    Added the "make_new_page ()" function in an attempt to isolate 
  444.     the "linecount" variable in the io.c file.
  445.  
  446. *    Changed the "read_char ()" routine in io.c to use the "quit ()" 
  447.     function when standard input is exhausted, rather than closing 
  448.     the file and deallocating memory itself.
  449.  
  450. *    In io.c, changed the "seed_random ()" routine to use the new 
  451.     "time_function" macro instead of using TIMESEED or the C "time 
  452.     ()" function explicitly.
  453.  
  454.  
  455.  
  456. Version 3.00 - March 10, 1990.
  457. ------------------------------
  458.  
  459. *    Renamed makefile to makefile.uni and introduced two new 
  460.     makefiles: makefile.azt and makefile.msc.
  461.  
  462. *    Created two new files: enhanced.c and plus.h.
  463.  
  464. *    Replaced calls to "printf ()" in file.c with calls to "echo ()".
  465.  
  466. *    Moved "init_print ()" call to init.c.
  467.  
  468. *    Added code to deal with the PLUS series data file header.
  469.  
  470. *    Added macro bit definitions for the "mode_bits" and 
  471.     "script_status" words in the data file header.
  472.  
  473. *    Renamed "play_game" to "PLAY_GAME", "init_game" to 
  474.     "INIT_GAME", "restart_game" to "RESTART_GAME" and 
  475.     "quit_game" to "QUIT_GAME".
  476.  
  477. *    Added the following STANDARD interpreter global variables: 
  478.     "screen_width", "screen_height", "linecount" and "enable_screen".
  479.  
  480. *    Added the following ENHANCED interpreter global variables: 
  481.     "disable_script", "windowing_enabled", "current_window" and 
  482.     "window_height".
  483.  
  484. *    Removed the following PLUS interpreter global variables: 
  485.     "current_window", "cuursor_x" and "cursor_y".
  486.  
  487. *    Added the following PLUS interpreter global variables: 
  488.     "printer_active", "use_buffered_io", "save_use_buffered_io", 
  489.     "use_internal_buffer", "internal_io_buffer", "internal_io_ptr" and 
  490.     "int_io_buff_length".
  491.  
  492. *    Added the following ENHANCED and PLUS series opcodes: 
  493.     "split_screen ()", "set_current_window ()", "clear_screen ()", 
  494.     "erase_line ()", "set_text_mode ()", "io_buffer_mode ()", "io_mode 
  495.     ()" and "get_key ()".
  496.  
  497. *    Modified the "verify ()" opcode in support.c to enable the 
  498.     verification of PLUS Series Data Files.
  499.  
  500. *    Rename variables "mx_scrx" to "screen_width" and "mx_scry" to 
  501.     "screen_height".
  502.  
  503. *    Rename macros "dmx_scrx" to "SCREEN_WIDTH" and "dmx_scry" 
  504.     to "SCREEN_HEIGHT".
  505.  
  506. *    Rename TERMCAP routine "gotoxy ()" to "tcap_goto_xy ()".
  507.  
  508. *    Implement new functions "tcap_putchar ()" and 
  509.     "tcap_erase_window ()".
  510.  
  511. *    Introduced the following Default I/O functions: "default_init_io 
  512.     ()", "default_exit_io ()", "default_putchar ()", "default_goto_xy 
  513.     ()", "default_use_window ()", "default_erase_window ()", 
  514.     "default_save_cursor ()", "default_restore_cursor ()", 
  515.     "default_erase_to_eoln ()" and "default_get_ch ()".
  516.  
  517. *    Introduced the following Lightspeed C I/O functions: "lsc_init_io 
  518.     ()", "lsc_putchar ()", "lsc_use_window ()", "lsc_erase_window 
  519.     ()", "lsc_save_cursor ()", "lsc_restore_cursor ()" and 
  520.     "lsc_erase_to_eoln ()".
  521.  
  522. *    Introduced the following Microsoft C I/O functions: "msdos_init_io 
  523.     ()", "msdos_putchar ()", "msdos_goto_xy ()", "msdos_use_window 
  524.     ()", "msdos_erase_window ()", "msdos_save_cursor ()", 
  525.     "msdos_restore_cursor ()" and "msdos_erase_to_eoln ()".
  526.  
  527. *    Inroduced the following UNIX I/O functions: "unix_init_io ()" and 
  528.     "unix_exit_io ()".
  529.  
  530. *    Introduced the following macros in machine.h for TERMCAP, 
  531.     UNIX, Lightspeed C, Microsoft C and default: "INIT_IO", 
  532.     "EXIT_IO", "PUT_CHAR", "GOTO_XY", "USE_WINDOW", 
  533.     "GET_CH", "ERASE_TO_EOLN", "ERASE_WINDOW", 
  534.     "SAVE_CURSOR" and "RESTORE_CURSOR". All I/O functions are 
  535.     now accessed through these macros.
  536.  
  537. *    Deleted "cr_print_buffer ()" and replaced it by a call to  
  538.     "print_buffer ()" followed by "out_char ( '\n' )".
  539.  
  540. *    Introduced the macro "USE_TIME".
  541.  
  542. *    Rename "status_line_length" to "screen_width".
  543.  
  544. *    In file io.c, deleted functions "init_io ()", "make_new_page ()" 
  545.     and "print_buffer ()". Removed the variable "linecount" from io.c 
  546.     and made it a global. Rewrote "print_buffer ()" - put it in 
  547.     print.c and changed its parameter list. The new "INIT_IO ()" 
  548.     function no longer returns the current line length.
  549.  
  550. *    Deleted the "prt_status ()" function from print.c and renamed the 
  551.     "show_status ()" function in status.c as "prt_status ()".
  552.  
  553. *    In plus_fns.c, rewrote the "set_cursor_posn ()" function.
  554.  
  555. *    In print.c, added code to initialise the ENHANCED and PLUS 
  556.     version print variables in the "init_print ()" function. Added 
  557.     code to handle the PLUS version of the "print_char ()" function.
  558.  
  559. *    In io.c, rewrote the "print_status ()" function to use "PUT_CHAR 
  560.     ()" and "GOTO_XY ()" instead of TERMCAP specific functions.
  561.  
  562. *    In io.c, rewrote the MORE code in the "out_char ()" function.
  563.  
  564.  
  565.  
  566. Version 3.01 - March 29, 1990.
  567. ------------------------------
  568.  
  569. *    Incorporated the file plus.h into infocom.h.
  570.  
  571. *    Incorporated the files makefile.azt, makefile.msc and makefile.uni 
  572.     into one makefile.
  573.  
  574. *    Defined the CAPITALISE & UNDERLINE macros for use in the 
  575.     PLUS version game header.
  576.  
  577. *    Removed the "back_space" macro and replaced it with the '\b' 
  578.     character (I didn't know about '\b' previously).
  579.  
  580. *    The "save_game ()" and "restore_game ()" functions were 
  581.     modified to support the PLUS interpreter. The Standard and 
  582.     Enhanced versions call the "ret_value ()" fuction before returning 
  583.     while the PLUS version calls the "store ()" function.
  584.  
  585. *    Defined new macros "MODE_BITS", "MALLOC ()" and "FREE ()".
  586.  
  587. *    Changed "ALLOCALL" to "RESERVE_RAM" due to a spelling bug 
  588.     in earlier files.
  589.  
  590. *    Corrected MS-DOS's screen height - changed it from 24 to 25 
  591.     lines.
  592.  
  593. *    Removed the MSDOS dependency from the "print_status ()" 
  594.     routine in io.c.
  595.  
  596. *    Rewrote the "read_char ()" and "out_char ()" functions in io.c to 
  597.     support the ENHANCED interpreter mode.
  598.  
  599. *    Replaced the "msdos_use_window ()", "default_init_io ()", 
  600.     "default_exit_io ()", "default_use_window ()", 
  601.     "default_erase_to_eoln ()", "default_erase_window ()" and 
  602.     "default_save_cursor ()" with the new "null_io ()" function.
  603.  
  604. *    Renamed all msdos I/O routines as ansi I/O routines. The old 
  605.     "msdos_putchar ()" becomes "ansi_putchar ()" and 
  606.     "msdos_putchar ()" was completely rewritten to use MS-DOS 
  607.     interrupts for scrolling. Rewrote "ansi_goto_xy ()" and 
  608.     "ansi_erase_window ()". Coded "ansi_save_cursor ()" and 
  609.     "ansi_restore_cursor ()".
  610.  
  611. *    Defined new catagories for ANSI and CURSES. Added the CURSES 
  612.     functions "curses_init_io ()", "curses_exit_io ()", "curses_putchar 
  613.     ()", "curses_goto_xy ()", "curses_erase_window ()", 
  614.     "curses_save_cursor ()", "curses_restore_cursor ()" and 
  615.     "curses_erase_to_eoln ()".
  616.  
  617. *    Recoded "tcap_putchar ()" and "tcap_erase_window ()". Removed 
  618.     "cls ()", "standout ()" and "standend ()". Added new TERMCAP 
  619.     functions "tcap_erase_to_eoln ()", "tcap_save_cursor ()" and 
  620.     "tcap_restore_cursor ()".
  621.  
  622. *    Fixed a bug in the "io_mode ()" function in io.c. The internal 
  623.     "data_head" structure's "script_status" field should be updated to 
  624.     reflect the current state of the resident game data file's 
  625.     "script_status" field. The bug prevented this.
  626.  
  627. *    Modified the "interp ()" function to set the "mode_bits" field of 
  628.     the header in both the PLUS and ENHANCED versions (in both 
  629.     the resident data file AND the internal interpreter "data_head" 
  630.     structure ).
  631.  
  632.  
  633.  
  634. Version 3.02 - May 24, 1990.
  635. ----------------------------
  636.  
  637. *    In the makefile, added support for Turbo C and the ENHANCED 
  638.     versions of Microsoft C, BSD TERMCAP, BSD ANSI, BSD 
  639.     CURSES, SYSV TERMCAP, SYSV ANSI and SYSV CURSES.
  640.  
  641. *    Changed the definition of "long_word" from "long" to "unsigned 
  642.     long" and created a new definition called "signed_long".
  643.  
  644. *    Changed "PRINTER_OK" to "SCRIPT_OK" and "PRINTER_ERROR" 
  645.     to "SCRIPT_ERROR".
  646.  
  647. *    Implemented scripting. Added the "init_script ()", "open_script 
  648.     ()", "close_script ()" and "script_char ()" functions.
  649.  
  650. *    Added macro APPEND_STRING - it is used by the scripting 
  651.     routines.
  652.  
  653. *    Captialised macro names READ_STRING and WRITE_STRING for 
  654.     style purposes.
  655.  
  656. *    Moved "init_print ()" from init.c to interp.c and options.c.
  657.  
  658. *    Modified function "check ()" to check the serial number of the 
  659.     restored data file against that in the "data_head" structure.
  660.  
  661. *    Rewrote the Lightspeed C interface routines to prevent the text 
  662.     running into the scroll bars in the default stdout window. Also 
  663.     implemented underlining in Lightspeed C.
  664.  
  665. *    Fixed a bug in the "look_up ()" routine in input.c. The "v_ptr" 
  666.     variable should be a "long_word", not a "word". This caused the 
  667.     end of some vocab tables not to be searched - they refused to 
  668.     recognise words we knew were in the vocab list.
  669.  
  670. *    Fixed a bug in "interp ()". When a game is restored, the old 
  671.     screen modes are still in effect. Calls to "USE_WINDOW ()" were 
  672.     inserted to correct this.
  673.  
  674. *    Modified "io_mode ()" and "io_buffer_mode ()" opcodes in 
  675.     plus_fns.c.
  676.  
  677.  
  678.  
  679. Version 3.03 - June 19, 1990.
  680. -----------------------------
  681.  
  682.  
  683. *    Capitalised the macros "TRUE", "FALSE", "BLOCK_SIZE", 
  684.     "STACK_SIZE", "MAX_PARAMS", "LOCAL_VARS", "Z_INTERP", 
  685.     "OBJ_SIZE", "OBJ_OFFSET", "TABLE_SIZE", "ENCODED_SIZE", 
  686.     "CHARS_PER_WORD", "ATTRIBUTE_BYTES", "TIME_FUNCTION", 
  687.     "OBJ_ATTR", "ECHO_INPUT", "HEAD_INFO", "OBJECTS", 
  688.     "NO_PAGE", "TREE", "OBJ_XFER", "VOCABULARY", 
  689.     "MAX_LINE_LENGTH", "EMPTY_PAGE", "MAX_COUNT", 
  690.     "END_OF_TABLE", "PLUS_ERROR_1", "PLUS_ERROR_2", 
  691.     "ERR_OPCODE", "ERR_MEMORY", "ERR_HEADER", 
  692.     "ERR_PUT_PROP", "ERR_NEXT_PROP".
  693.  
  694. *    Renamed "prop_mask" to "PROP_NUM_MASK", "mode_mask" to 
  695.     "WORD_MASK" and "max_mem" to "MAX_BYTES".
  696.  
  697. *    Introduced the "BITS_PER_BYTE", "FIRST_ATTRIBUTE", 
  698.     "USE_TIME", "NEXT_BYTE_IS_LENGTH", "WORD_MASK", 
  699.     "PROPERTY_LENGTH ()", "PAGE ()", "OFFSET ()", 
  700.     "MOST_SIGNIFICANT_BYTE ()" and "LEAST_SIGNIFICANT_BYTE 
  701.     ()" macros.
  702.  
  703. *    Changed definitions of "byte", "word", "long_word", 
  704.     "signed_word" and "signed_long" from macros to typedefs.
  705.  
  706. *    Introduced the types byte_ptr, word_ptr, object_ptr, 
  707.     Page_Table_ptr and header_ptr instead of byte *, word *, object 
  708.     *, Page_Table *    and header *. They are defined in terms of the 
  709.     macros "BYTE", "WORD", "OBJECT", "PAGE_TABLE" and 
  710.     "HEADER" since the Turbo C version needs to explicitly specify 
  711.     huge pointers.
  712.  
  713. *    The "jmp_op0", "jmp_op1" and "jmp_op2" arrays are now defined 
  714.     as being of type "ProcPtr".
  715.  
  716. *    Improved the "allocate ()" function. It will now allocate the page 
  717.     table as well as the pages. The previous version would also try 
  718.     to allocate the maximum amount of memory, regardless of whether 
  719.     the game actually required the full amount. This has been fixed.
  720.  
  721. *    The "pre-load" option was introduced.
  722.  
  723. *    In makefile, removed the "-v" option from the Turbo C entry.
  724.  
  725. *    The "LT ()" and "GT ()" functions were renamed "less_than ()" 
  726.     and "greater_than ()".
  727.  
  728. *    In "save_game ()" and "restore_game ()" functions in file.c, the 
  729.     way the z-machine's stack was saved contained a bug. The 
  730.     previous version used fread and fwrite to save and restore the 
  731.     stack. However, if a game saved using this method on a high-
  732.     endian machine (68000) was restored on a little-endian machine 
  733.     (8088, etc.) the game would not run - the high and low bytes of 
  734.     the stack would apprear to have been swapped. The stack is now 
  735.     saved and restored word by word in a machine independent 
  736.     manner.
  737.  
  738. *    Recoded the PLUS function "get_key ()" properly ( the previous 
  739.     version was a kludge ) and added the support functions 
  740.     "read_the_key ()", "wait_for_key ()" and "special_gosub ()". 
  741.     Introduced the "KBD_HIT" and "ONE_SECOND" macros and the 
  742.     "default_kbd_hit ()" routine.
  743.  
  744. *    The "interp ()" routine was split into two parts: an initialisation 
  745.     part "init_interpreter ()" and the main loop "execute_opcode ()". 
  746.     This was done because the "special_gosub ()" function needed to 
  747.     call the main loop recursively. This also caused the way the 
  748.     game's status was recorded. Instead of a word representing the 
  749.     game's status, a boolean representing the stop condition is used 
  750.     instead.
  751.  
  752. *    Completed the PLUS version of the "rtn ()" opcode - dummy code 
  753.     was previously enclosed by comments.
  754.  
  755.  
  756.  
  757. Version 3.04 - August 13, 1990.
  758. -------------------------------
  759.  
  760.  
  761. *** The PLUS Interpreter is finally complete ***
  762.  
  763.  
  764. *    Added the "MSC" directive for Microsoft C. The "MSDOS" 
  765.     directive is now used for the generic MS-DOS routines.
  766.  
  767. *    Modified the makefile to generate the infocom.col file. In the 
  768.     Microsoft C definitions, added graphics.lib to all entries. In the 
  769.     Turbo C entry, defined the TC_LIB macro and removed the -
  770.     DMSDOS definition.
  771.  
  772. *    Defined the macro "PROPERTY_NUMBER".
  773.  
  774. *    Fixed a bug in the "split_screen ()" function. If it is called with 
  775.     a non-zero parameter, the upper window should not be erased in 
  776.     the PLUS version.
  777.  
  778. *    In file.c, redefined "name_size" as "NAME_SIZE".
  779.  
  780. *    Changed the script file from having the fixed name of 
  781.     "transcript" to allowing the user to enter it. Also modified the 
  782.     "script_char ()" routine to ignore special characters. The line-
  783.     feed to carriage-return translation is not necessary and was also 
  784.     removed.
  785.  
  786. *    Casting was added to integer constants to prevent compiler and 
  787.     lint complaints.
  788.  
  789. *    To fix a display mode bug the "raw_echo ()" function was added. 
  790.     It uses "printf ()" to directly print ANSI escape sequences. If 
  791.     "echo ()" is used instead, the new output capabilities of the 
  792.     PLUS interpreter may cause the string may be printed to a buffer 
  793.     instead of to standard output, delaying the changing of the 
  794.     printing modes.
  795.  
  796. *    Replaced all "printf ()" calls ( except in "raw_echo ()" ) with 
  797.     calls to new functions "echo ()", "hex_echo ()", "print_item ()" 
  798.     and "PUT_CHAR ()".
  799.  
  800. *    Fixed a bug in the "compare2 ()" function which prevented the 
  801.     PLUS interpreter from recognising certain words in the game's 
  802.     vocabulary. PLUS series games keep a list of synonyms by which 
  803.     all objects are known - the bug prevented the last synonym in 
  804.     the list from being checked.
  805.  
  806. *    In options.c, fixed a "bug" in the "show_vocab ()" function. 
  807.     Some games contain words in their vocab lists which do not have 
  808.     the end_of_word bit set. In these cases, the "print_coded ()" 
  809.     routine goes crazy. To fix this, the "show_vocab ()" routine was 
  810.     modified to directly call the "decode ()" routine the correct 
  811.     number of times, regardless of the end_of_word bit.
  812.  
  813. *    In property.c, added castings in the "load_word_array ()", 
  814.     "save_word_array ()" and "save_byte_array ()" functions to 
  815.     correctly calculate addresses. The logic of the "next_addr ()", 
  816.     "get_prop_addr ()" and "get_p_len ()" was also redone to enhance 
  817.     the clarity of their algorithms.
  818.  
  819. *    In machine.h and io.c, instead of having generic MS-DOS I/O 
  820.     routines, we now have three sets of routines - one for Microsoft 
  821.     C, one for Turbo C and a generic MS-DOS set of routines. The 
  822.     Microsoft C and Turbo C routines use the graphics library 
  823.     routines to enhance the interpreter's output - the screen height 
  824.     and width are also determined from the graphics library routines 
  825.     allowing 43 and 50 line mode support. The Microsoft C version 
  826.     uses a separate text page for the interpreter's output.
  827.  
  828. *    In io.c, fixed a bug in the putchar routines. The text attributes 
  829.     are now to be set regardless of the setting of the "enable_screen" 
  830.     flag. It was found that in some cases, the text attributes were 
  831.     being changed while the screen was disabled and hence were 
  832.     being lost - the screen was then enabled and the text printed, 
  833.     but in the wrong mode.
  834.  
  835. *    In io.c, fixed a bug in the "out_char ()" routine. A line_feed is 
  836.     printed only if the screen is enabled.
  837.  
  838. *    In io.c, the "ansi_erase_window ()" was modified to include a 
  839.     SIMPLE_ANSI variant some ANSI implementations support only the 
  840.     erase line ANSI sequence and not the erase screen ANSI 
  841.     sequence. MS-DOS's ANSI.SYS driver is one such implementation.
  842.  
  843.  
  844.  
  845. Version 3.05 - August 29, 1990.
  846. -------------------------------
  847.  
  848.  
  849. *** This is the first version to include ADVANCED Interpreter Routines ***
  850.  
  851.  
  852. *    Added code to handle the new fields in the ADVANCED header.
  853.  
  854. *    Added ADVANCED Interpreter Routines to plus_fns.c. They are: 
  855.     "gosub4 ()", "gosub5 ()", "call ()", "branch_true ()", 
  856.     "num_local_params ()", "logical_shift ()" and "arithmetic_shift 
  857.     ()".
  858.  
  859. *    Replaced entries $1B, $1C, $38, $3B - $3E in the "jmp_op2" 
  860.     opcode table with the dummy functions "new_opcode0 ()", 
  861.     "new_opcode1 ()" and "new_opcode2 ()".
  862.  
  863. *    Increased the size of the "jmp_op2" opcode table from $3F entries 
  864.     to $50 entries.
  865.  
  866. *    Split the tail end of the "operand3 ()" function into a separate 
  867.     function called "call_function ()".
  868.  
  869. *    Added the "operand4 ()" function and other code to handle the 
  870.     new 0xBE opcode.
  871.  
  872. *    Updated the way the 0xEC opcode parameters are handled and 
  873.     added code to deal with the new 0xFA opcode.
  874.  
  875. *    Changed the "input ()" function to support the ADVANCED 
  876.     interpreter. The ADVANCED version requires the "input ()" 
  877.     function call "store ()" before returning.
  878.  
  879. *    Changed the opcode for "not ()" in the ADVANCED version.
  880.  
  881. *    Modified the "pop_stack ()" opcode for the ADVANCED 
  882.     Interpreter.
  883.  
  884. *    The "gosub ()" opcode was modified to call the "call ()" function 
  885.     in the ADVANCED Interpreter. This function stores the call type 
  886.     (FUNCTION or PROCEDURE) on the stack along with the number 
  887.     of parameters that this gosub call pushed onto the stack. It also 
  888.     does not decrement the "stack_var_ptr". The "rtn ()" function 
  889.     was similarly modified in order to reverse the "gosub ()" call.
  890.  
  891. *    Modified the "get_var ()" and "put_var ()" opcodes for the 
  892.     ADVANCED interpreter. This is due to the change in the way 
  893.     "stack_var_ptr" is calculated in the "gosub ()" opcode.
  894.  
  895. *    Added a test to see whether the "game_file" or "script_file" is 
  896.     open before closing them.
  897.  
  898. *    Fixed a bug in the "script_char ()" routine. We must temporarily 
  899.     turn off the "SCRIPT_MODE" bit that is pointed to by 
  900.     "script_status_ptr" because "script_on" must remain "FALSE" until 
  901.     the script file is open and "open_script ()" calls "filename ()" 
  902.     which calls "read_char ()" which calls this routine which will try 
  903.     to open a script file by calling "open_script ()" ... The 
  904.     "SCRIPT_MODE" bit is turned back on if the script file is 
  905.     successfully opened.
  906.  
  907. *    Pre-initialised global variables in globals.c
  908.  
  909. *    Changed the entries in the opcode tables from "save_game" and 
  910.     "restore_game" to the macros "save" and "restore".
  911.  
  912. *    In the "out_char ()" function in io.c, swapped the order of the 
  913.     "PUT_CHAR ()" and "script_char ()" calls.
  914.  
  915. *    Cleaned up the way the interpreter quits and moved the calls to 
  916.     the clean up functions from "quit ()" to "main ()".
  917.  
  918.  
  919.  
  920. Version 3.06 - October 11, 1990.
  921. --------------------------------
  922.  
  923.  
  924. *    Disable the "save_game ()" and "restore_game ()" opcodes in 
  925.     ADVANCED mode.
  926.  
  927. *    Changed name of "echo ()" to "display ()" because there is an 
  928.     "echo ()" function in CURSES.
  929.  
  930. *    Also changed "hex_echo ()" to "hex_display ()" and "raw_echo 
  931.     ()" to "raw_display ()".
  932.  
  933. *    Cleaned up some definitions in infocom.h.
  934.  
  935. *    Added default INIT_SIGNAL stub - it did not actually do 
  936.     anything.
  937.  
  938. *    Added "interpreter_number" header byte definitions.
  939.  
  940. *    In input.c, the function "input ()" was changed to include 
  941.     support for the "default _parameter_stack" which is an 
  942.     ADVANCED interpreter addition. It is included for all versions 
  943.     since it actually has no effect on anything but the ADVANCED 
  944.     version.
  945.  
  946. *    In input.c, changed the logic in the "read_line ()" function.
  947.  
  948. *    In input.c, introduced the "advanced_parse_buffer ()" function 
  949.     for use by the ADVANCED interpreter instead of the 
  950.     "parse_buffer ()" routine used by the other versions.
  951.  
  952. *    Included the following ADVANCED functions in input.c: 
  953.     "scan_buffer ()","buffer_copy ()","get_code 
  954.     ()","advanced_parse_buffer ()".
  955.  
  956. *    Because of the way certain HP terminals do underlining and 
  957.     inverse characters, the TERMCAP entries in io.c were modified to 
  958.     turn off any inverse or underline modes before quitting or moving 
  959.     the cursor (including when printing a '\n'). Code was added to 
  960.     keep track of the current text mode and restore them after the 
  961.     cursor has been moved.
  962.  
  963. *    In io.c, introduced new functions to get the current x and y 
  964.     cursor coordinates: "default_get_x ()" and "default_get_y ()". 
  965.     Because of these functions, the individual "putchar ()" routines 
  966.     no longer need to keep track of which screen line they are 
  967.     currently printing on. Also introduced a generic 
  968.     "default_save_cursor ()" and modified the existing 
  969.     "default_restore_cursor ()" to use the new "GET_X ()" and 
  970.     "GET_Y ()" macros. This allowed the replacement of specific save 
  971.     and restore cursor routines with the generic ones in many cases.
  972.  
  973. *    In the TERMCAP routines, support was added for "Terminal_Init" 
  974.     and "Terminal_Exit" strings. This prompted the introduction of 
  975.     the "tcap_exit_io ()" routine instead of the "unix_exit_io ()" 
  976.     routine.
  977.  
  978. *    In CURSES routines, removed "refresh ()" calls from everywhere 
  979.     except the new "curses_get_ch ()" routine (the "curses_get_ch 
  980.     ()" routine is used instead of the "getch ()" routine for this 
  981.     reason).
  982.  
  983. *    In "curses_putchar ()", only SYS_V CURSES calls for changing 
  984.     text modes (inverse and underline) were used. The equivalent 
  985.     BSD CURSES calls have been added.
  986.  
  987.  
  988. *    Included the following ADVANCED functions in plus_fns.c:
  989.         "parameter_copy ()","throw_away_stack_frame ()","parse ()",
  990.         "encrypt ()","block_copy ()","print_text ()","clear_flag ()",
  991.         "set_flag ()","array_test ()","test_byte_array ()".
  992.  
  993. *    Modified "compare2 ()" function in plus_fns.c for ADVANCED 
  994.     operation.
  995.  
  996. *    Modified "set_mode ()" function in plus_fns.c to check its mode 
  997.     parameter is < 5 in ADVANCED operation.
  998.  
  999. *    Modified "get_key ()" function in plus_fns.c to firstly flush the 
  1000.     print buffer in ADVANCED operation.
  1001.  
  1002. *    Included a "msc_adv" entry to the makefile.
  1003.  
  1004.  
  1005.  
  1006. Version 3.07 - November 21, 1990.
  1007. ---------------------------------
  1008.  
  1009.  
  1010. *    Added ADVANCED support to "set_current_window ()", 
  1011.     "split_screen ()" and "restore_cursor_position ()" in enhanced.c. 
  1012.     Before setting the current window in ADVANCED mode, the print 
  1013.     buffer should be flushed. After setting a split screen in 
  1014.     ADVANCED mode, move the cursor to the bottom left hand side of 
  1015.     the screen. If "restore_cursor_position ()" is called in ADVANCED 
  1016.     mode without the cursor having been saved, it is moved to the 
  1017.     bottom left hand corner of the screen.
  1018.  
  1019. *    In the "clear_screen ()" function of plus_fns.c, after erasing the 
  1020.     entire screen, the cursor is not placed at the bottom left hand 
  1021.     corner of the screen if it is in ADVANCED mode.
  1022.  
  1023. *    Added signal handling to facilitate a graceful exit from the 
  1024.     interpreter when <ctrl-C> etc. is received by the program. This 
  1025.     affects infocom.h, machine.h, globals.c, infocom.c, init.c and 
  1026.     io.c.
  1027.  
  1028. *    In the previous TERMCAP version, any text modes such as 
  1029.     inverse or underline are turned off before the cursor is moved. 
  1030.     However, funny things happen if these modes are turned off if 
  1031.     they are not in fact currently turned on. Hence code was added 
  1032.     toturn these modes off only if they are currently on.
  1033.  
  1034. *    Added "-ltermcap" to the BSD CURSES entries in the makefile.
  1035.  
  1036. *    To tidy up the display, a '\n' is printed and a refresh performed 
  1037.     when leaving CURSES.
  1038.  
  1039. *    Fixed a bug in the CURSES routines in io.c. The "getyx ()" 
  1040.     macro was used incorrectly.
  1041.  
  1042.  
  1043.  
  1044. Version 3.08 - May 7, 1991.
  1045. ---------------------------
  1046.  
  1047.  
  1048. *    Added VOID as the return type of most functions.
  1049.  
  1050. *    Changed the Standard Version of "read_header ()" to allow 
  1051.     VERSION_1 and VERSION_2 files to be accepted.
  1052.  
  1053. *    In message.c, changed decoding routines to support VERSION_1 
  1054.     and VERSION_2 encodings.
  1055.  
  1056. *    Changed "init ()" to set max_blocks to 64 K for VERSION_1 and 
  1057.     VERSION_2 since "verify_length" is not available in these 
  1058.     headers. Also call "init_message ()".
  1059.  
  1060. *    In plus_fns.c, fixed bugs in the ADVANCED "print_text ()" 
  1061.     routine.
  1062.  
  1063. *    For VERSION_4 and VERSION_5, in "init_interpreter ()" changed 
  1064.     value of screen_width stored in the header from the actual screen 
  1065.     width - 1 to actual screen width. This was required for the 
  1066.     "print_text ()" bug fix - it was initially wrong.
  1067.  
  1068. *    In all "putchar ()" routines, translate character '\0' to ' ' before 
  1069.     printing. This was required to fix a problem encountered in 
  1070.     Beyond Zork where the text description of the initial location is 
  1071.     printed in inverse and has a gap on the end of one line which 
  1072.     should not be there.
  1073.  
  1074.  
  1075.  
  1076. Version 4.00 - March 20, 1992.
  1077. ------------------------------
  1078.  
  1079.  
  1080. *** This is the first version to play all version 1,2,3,4 and 5 data files ***
  1081.  
  1082.  
  1083. *    Changed type "VOID" to "Void" because of a definition clash with some
  1084.     versions of Curses.
  1085.  
  1086. *    Changed type "Boolean" to "boolean" to be consistent with the current
  1087.     type naming conventions used in the rest of the files.
  1088.  
  1089. *    Changed type "ProcPtr" to "proc_ptr" to be consistent with the current
  1090.     type naming conventions used in the rest of the files.
  1091.  
  1092. *    Changed types "Page_Table" and "Page_Table_ptr" to "page_table_t" and
  1093.     "page_table_ptr" to be consistent with the current type naming
  1094.     conventions used in the rest of the files.
  1095.  
  1096. *    Removed the #ifdefs for ENHANCED, PLUS and ADVANCED. Explicit checking
  1097.     of the z_code_version field of the data_head variable are used to
  1098.     distinguish between versions. This was done to allow a single
  1099.     interpreter to execute any data file instead of having to build
  1100.     explicit interpreters for each data file type using compile-time
  1101.     #ifdefs.
  1102.  
  1103. *    Changed the macro "TOP_SCREEN_LINE" to "STD_TOP_SCREEN_LINE" and
  1104.     "PLUS_TOP_SCREEN_LINE". A global variable "top_screen_line" was then
  1105.     introduced to hold the value of the top screen line applicable to the
  1106.     current data file.
  1107.  
  1108. *    Changed the definition of the "header_ptr", "byte_ptr", "object_ptr"
  1109.     and "page_table_ptr" types. They are usually the same as "header *",
  1110.     "byte *", "object *" and "page_table *" except for MS-DOS compilers,
  1111.     where they are explicitly defined as HUGE (the latter form may or may
  1112.     not be HUGE, depending upon the memory model chosen). All references
  1113.     that possibly require the HUGE qualifier are now defined in terms of
  1114.     the "header_ptr", "byte_ptr" or "object_ptr", while those that do not
  1115.     matter are now defined as "header *", "byte *" or "object *". Note that
  1116.     the "object" and "object_ptr" no longer exist - "std_object" and
  1117.     "plus_object" types replace "object" and their use depends upon the
  1118.     data file being run. Similarly, "std_object_ptr" and "plus_object_ptr"
  1119.     replace the "object_ptr" type.
  1120.  
  1121. *    The "word_ptr" type is now obsolete - "word *" is used instead since
  1122.     no "word_ptr" references required these pointers to be HUGE on MS-DOS
  1123.     compilers.
  1124.  
  1125. *    The macro MAX_VERSION was defined - it is the highest Z-Code version
  1126.     that the interpreter can understand. It is used in the "read_header ()"
  1127.     function in "file.c" to determine whether this version of the
  1128.     interpreter can handle the current data file.
  1129.  
  1130. *    The fields "unknown5", "unknown6" and "padding3" were added to the
  1131.     "header" type.
  1132.  
  1133. *    In file "fns.c", split the "random ()" function into "std_random ()"
  1134.     and "plus_random ()".
  1135.  
  1136. *    In file "globals.c", the "use_internal_buffer" variable is set to FALSE
  1137.     by default.
  1138.  
  1139. *    In file "globals.c", a global variable "main_vocab_list" was
  1140.     introduced. This is needed by the ADVANCED input processing routines.
  1141.  
  1142. *    In file "globals.c", the "obj_list" variable has become "std_obj_list"
  1143.     and "plus_obj_list". It depends upon the current data file as to which
  1144.     one is used.
  1145.  
  1146. *    Added the "enhanced" run-time flag - this is used instead of
  1147.     #ifdef ENHANCED. Also defined the NO_OPTIONS macro.
  1148.  
  1149. *    Function declarations were removed from "globals.c" - they are already
  1150.     in "infocom.h". "new_opcode1 ()" was moved from "globals.c" to
  1151.     "init.c".
  1152.  
  1153. *    The "save ()" and "restore ()" functions have been renamed
  1154.     "save_game ()" and "restore_game ()".
  1155.  
  1156. *    The functions "pop_stack ()", "get_link ()", "get_holds ()",
  1157.     "get_loc ()", "get_p_len ()", "remove_obj ()", "p_obj ()", "rtn ()",
  1158.     "print2 ()", "check_loc ()", "test_attr ()", "set_attr ()",
  1159.     "clr_attr ()", "transfer ()", "getprop ()", "get_prop_addr ()",
  1160.     "get_next_prop ()", "gosub ()", "put_prop ()", "random ()" have been
  1161.     split into a standard interperter function and a plus interperter
  1162.     function.
  1163.  
  1164. *    The jump tables in "globals.c" have been changed to reflect a VERSION_1
  1165.     Z-Code interpreter only. Everything else is an illegal opcode. It is
  1166.     now up to the initialisation functions to identify the current data
  1167.     file's Z-Code type and patch the jump tables accordingly.
  1168.  
  1169. *    Added the -n ENHANCED, -s SHOW_PROPS and -x EXTENDED_VOCAB run-time
  1170.     options.
  1171.  
  1172. *    Improved macro definitions in "infocom.h". Removed the Z_INTERP and
  1173.     ATTRIBUTE_BYTES macros. Changed the PAGE, OFFSET, CHARS_PER_WORD,
  1174.     ENCODED_SIZE, OBJ_SIZE, OBJ_OFFSET, PROP_NUM_BITS, PROP_NUM_MASK,
  1175.     PROPERTY_LENGTH and PROPERTY_NUMBER macros to separate STD_ and PLUS_
  1176.     macros. Defined the STD_OBJ_ADDR and PLUS_OBJ_ADDR macros.
  1177.  
  1178. *    Changed the structure type "object" into separate "std_object" and
  1179.     "plus_object" types.
  1180.  
  1181. *    Changed the "init ()" routine in "init.c" to correctly initialise the
  1182.     new standard interpreter and plus interpreter variables based on the
  1183.     current data file. A new function "init_opcodes ()" was added to
  1184.     correctly set up the interpreter jump tables.
  1185.  
  1186. *    Removed the global arrays "coded[]" and "the_word[]" from "input.c".
  1187.  
  1188. *    Introduced the globals variables "initial_chop" and "has_initial_chop"
  1189.     in "input.c". The function "init_vocab ()" was added to initialise the
  1190.     input routine global variables, depending upon the current data file's
  1191.     Z-Code version. This routine replaces some of the code from the
  1192.     "init_input ()" function.
  1193.  
  1194. *    In file "input.c", replaced the "parse_buffer ()" function by the
  1195.     "std_parse_buffer ()" and "plus_parse_buffer ()" routines.
  1196.  
  1197. *    In file "input.c", the "look_up ()" function parameter list has changed
  1198.     - it now requires the "encoded_size" parameter since its size is
  1199.     different for different data files. Added the "coded[]" parameter to
  1200.     the "get_code ()" function - this is now passed as a parameter instead
  1201.     of being a global variable.
  1202.  
  1203. *    The call to "advanced_parse_buffer ()" is now being passed the correct
  1204.     parameter in the "vocab_strt" and "ignore_offset" fields. The
  1205.     "advanced_parse_buffer ()" function now correctly handles parsing for
  1206.     version 5 games.
  1207.  
  1208. *    The LONG_ALLOCATE option has been removed - it is now the only type of
  1209.     allocation available. The RESERVE_RAM option has also been removed -
  1210.     this was originally added to support Macintoshes with very little RAM,
  1211.     a situation which has now changed.
  1212.  
  1213. *    In file "io.c", a "tc_getch ()" was added and used instead of the
  1214.     standard "getch ()" routine. The difference is that "tc_getch ()"
  1215.     handles CTRL_C signal processing.
  1216.  
  1217. *    Changed the ANSI and SIMPLE_ANSI macros to ANSI_ESCAPE and
  1218.     SIMPLE_ANSI_ESCAPE respectively. Added the ANSI_COLOR macro.
  1219.  
  1220. *    In file "io.c", added routines to parse a new default colour file
  1221.     ".infocomrc" and added the ANSI_COLOR routines. The default colour file
  1222.     is still "infocom.col" for the MS-DOS routines. Initially, ANSI escape
  1223.     sequence support was included primarily for MS-DOS machines - it can
  1224.     now be used by UNIX machines as well. Hence the creation of
  1225.     "ansi_exit_io ()" and modification to "ansi_init_io ()". Fixed the save
  1226.     and restore cursor routines to operate only if those escape sequences
  1227.     exist on the target system.
  1228.  
  1229. *    In file "io.c", declared the UNIX structures as static, added a
  1230.     signal_handler "signal_winch ()" to handle changes in size of Sun
  1231.     windows. Added extra checking to the TERMCAP routines in regard to
  1232.     saving and restoring the cursor. A call to "setbuf ()" was also added.
  1233.  
  1234. *    In file "io.c", added calls to "scrollok ()" and "idlok ()" in the
  1235.     "curses_init_io ()" routine. This improves the Curses interface
  1236.     somewhat.
  1237.  
  1238. *    In file "io.c", started adding interface routines for THINK C
  1239.     Version 4.0 for the Macintosh. New routines were necessary since the
  1240.     old ones relied on manipulating some of the internal variables of their
  1241.     standard library calls. In newer versions of the compiler, these
  1242.     internal variables are now declared as static and hence are not visible
  1243.     to the application program - hence the need for the new routines.
  1244.     THESE ARE NOT YET COMPLETE !!!
  1245.  
  1246. *    In file "jump.c", changed the "gosub ()" routine into "std_gosub ()",
  1247.     "plus_gosub ()" and "adv_gosub ()" routines. The "rtn ()" routine was
  1248.     changed into the "std_rtn ()" and "adv_rtn ()" routines. Since
  1249.     "ret_true ()" and "ret_false ()" rely on the "rtn ()" routine, these
  1250.     now use the jump table to execute the version of the "rtn ()" command
  1251.     that is in current use. The "pop_stack ()" function was also split into
  1252.     "std_pop_stack ()" and "adv_pop_stack ()" functions.
  1253.  
  1254. *    In interpreters prior to VERSION_5, the "stack_var_ptr" pointed to the
  1255.     first local variable on the z_code stack. In VERSION_5 and subsequent
  1256.     interpreters, the "stack_var_ptr" points to the stack entry above the
  1257.     first local variable on the z_code stack.  However, there is no reason
  1258.     for us not to adopt the VERSION_5 method for all versions of the
  1259.     interpreter. This decision affects the following opcodes: gosub,
  1260.     std_rtn, load_var & put_var.
  1261.  
  1262. *    Removed the BYTE, WORD, OBJECT, PAGE_TABLE and HEADER macros. Added
  1263.     the HUGE macro for MS-DOS support.
  1264.  
  1265. *    AZTEC C for the Macintosh is no longer supported - THINK C 4.0 support
  1266.     is starting to be added instead.
  1267.  
  1268. *    In file "machine.h", checking was added for the Curses "cbreak ()"
  1269.     function. If this does not exist, "crmode ()" is used instead.
  1270.  
  1271. *    The "makefile" has been simplified by the removal of the ENHANCED,
  1272.     PLUS and ADVANCED options. ANSI_COLOR entries were added. The entries
  1273.     for TURBOC and MSC have been enhanced, with the "qc" build option also
  1274.     being added.
  1275.  
  1276. *    In file "message.c", changed the "encode ()" function into
  1277.     "std_encode ()" and "plus_encode ()".
  1278.  
  1279. *    In file "options.c", added the macros MAX_CHARS_PER_WORD and
  1280.     BYTE_DISPLAY. Modified the "show_vocab ()" routine to allow the new
  1281.     EXTENDED_VOCAB option. Modified the "show_objects ()", "show_tree ()"
  1282.     and "obtree ()" functions to handle the current data file Z-Code type
  1283.     dynamically by passing it as a parameter. Defined a new function
  1284.     "prop_name ()" which determines whether the name of an object is valid
  1285.     (that is, of non-zero length). Also defined functions
  1286.     "show_std_props ()" and "show_plus_props ()" for use by the
  1287.     "show_tree ()" and "show_objects ()" functions with the new SHOW_PROPS
  1288.     option.
  1289.  
  1290. *    In file "page.c", changed the "fix_pc ()" routine back to using the
  1291.     old method of calculating the current program counter value. This was
  1292.     done because the new method, although faster, was performed incorrectly
  1293.     on some compilers (they did not handle modulo operations (%) with
  1294.     negative arguments correctly).
  1295.  
  1296. *    In file "plus_fns.c", the "compare2 ()" function has been split into
  1297.     the "plus_compare2 ()" and "adv_compare2 ()" functions. The "gosub2 ()"
  1298.     and "special_gosub ()" functions were changed to use the opcode jump
  1299.     table to execute the current version of the "gosub ()" command (since
  1300.     these differ in version 4 and version 5 games).
  1301.  
  1302. *    In file "plus_fns.c", the "set_text_mode ()" function was slightly
  1303.     modified. In interpreters prior to VERSION_5, the "mode" parameter in
  1304.     the "set_text_mode ()" command is not checked before being incremented
  1305.     and passed to "print_char ()". In VERSION_5 and subsequent
  1306.     interpreters, the "mode" parameter is checked first. However, there is
  1307.     no reason for us not to adopt the VERSION_5 method for all versions of
  1308.     the interpreter.
  1309.  
  1310. *    In file "print.c", the "init_print ()" function was modified to
  1311.     correctly set the new "top_screen_line" global variable.
  1312.  
  1313. *    In file "status.c", the "copy_string ()" function was changed to
  1314.     return a pointer to the end of the destination string.
  1315.  
  1316. *    In file "variable.c", changed the "load_var ()" and "put_var ()"
  1317.     functions to interpret the meaning of the "stack_var_ptr" global
  1318.     variable in a way that is consistent across all Z-Code types.
  1319.  
  1320.  
  1321.  
  1322. Version 4.01 - September 26, 1992.
  1323. ----------------------------------
  1324.  
  1325.  
  1326. *** This is the first version to be officially released on the Internet ***
  1327.  
  1328.  
  1329. *    In "makefile", added explanantion entries for ANSI_COLOR and
  1330.     CURSES_COLOR. Changed all references of "infocom.col" to "infocom.rc".
  1331.     Removed the build target for "infocom.col" and replaced it with one
  1332.     for the new "infocom.rc" and ".infocomrc" colour file formats. Added
  1333.     the "-DMSC" option to the Microsoft C build line (this was previously
  1334.     omitted since some versions of make for MS-DOS define this by default).
  1335.     Enhanced the UNIX build entries (use gcc by default) and added some
  1336.     build options for CURSES_COLOR and TERMINFO.
  1337.  
  1338. *    In file "file.c", initialised the "script_status_ptr" global variable.
  1339.  
  1340. *    Moved calls to "init_script ()" from "init.c" to "infocom.c" - this
  1341.     fixes a subtle bug which ocurred with the setting of the "enhanced"
  1342.     flag. Some "init_io" routines require knowledge of whether or not it
  1343.     is set, and these are called before the game file is examined to
  1344.     determine its Z-Code type.
  1345.  
  1346. *    In files "init.c", "plus_fns.c" and "infocom.h", the "clear_screen ()"
  1347.     and "beep ()" functions were renamed to "do_clear_screen ()" and
  1348.     "do_beep ()" to prevent clashes with some versions of the termcap and
  1349.     curses library function names.
  1350.  
  1351. *    In file "io.c", added code to handle a generic configuration file,
  1352.     containing colour information, etc. Code to do similar things in the
  1353.     MSC, TURBOC and ANSI_ESCAPE sections have been removed and adapted to
  1354.     use these new generic routines.
  1355.  
  1356. *    In file "io.c", changed the parameter lists of the
  1357.     "default_signal_init ()", "signal_shit ()", "signal_chit ()" and
  1358.     "signal_winch ()" functions.
  1359.  
  1360. *    In file "io.c", added support for parametised delete_line to the
  1361.     TERMCAP routines.
  1362.  
  1363. *    In file "io.c", added the TERMINFO interface.
  1364.  
  1365. *    In file "io.c", changed the Curses colour routines to use the new
  1366.     generic routines.
  1367.  
  1368. *    In file "machine.h", added new macros RCFILE, CURSES_COLOR and
  1369.     WANT_COLOR. Added test for __STDC__ to define the Void macro. Added
  1370.     support for TERMINFO interface. Moved the #ifdef test for the Curses
  1371.     "cbreak ()" function to "io.c".
  1372.  
  1373. *    In file "plus_fns.c", fixed a bug in the "set_cursor_posn ()" function.
  1374.     In version 5 interpreters, it should flush the print buffer before
  1375.     moving the cursor. This bug was found with a version 5 Hitchhiker's
  1376.     Guide data file.
  1377.  
  1378. *    In files "enhanced.c", "file.c", "fns.c", "init.c", "input.c", "io.c",
  1379.     "message.c", "object.c", "options.c", "page.c", "plus_fns.c", and
  1380.     "status.c" - added some type casts to fix any compiler/lint complaints.
  1381.  
  1382. *    In file "io.c", added function declarations to fix any compiler/lint
  1383.     complaints.
  1384.  
  1385.  
  1386.  
  1387. Version 4.01 - Known Bugs.
  1388. --------------------------
  1389.  
  1390. *    The interface for THINK C 4.0 for the Macintosh is currently broken.
  1391.  
  1392. *    There are still several version 5 opcodes and header flags which are
  1393.     unknown. Their absense should not affect the playing of version 5 data
  1394.     files.
  1395.  
  1396. *    It does not support sound opcodes for any data file version. Nor does
  1397.     it support the #comm, #reco and #unre debugging commands in some games.
  1398.     This will definitely be fixed in the next release.
  1399.  
  1400.  
  1401.  
  1402. Version 4.01 - General Release. Current Porting List:
  1403. -----------------------------------------------------
  1404.  
  1405.  
  1406. Machine        C Compiler        Interpreter    Porting details
  1407. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1408.  
  1409. 128K Apple 
  1410. Macintosh    Aztec C Version 1.06F    Version 2.00    No longer 
  1411.                             supported.
  1412.  
  1413. DEC VAX 11/780    UNIX V7 cc        Version 2.00    
  1414.  
  1415. gould        cc            Version 2.00    
  1416.  
  1417. Amiga        Aztec C            Version 2.00    
  1418.  
  1419. Pyramid 9810    cc            Version 2.00    
  1420.  
  1421. Pyramid 90x    cc            Version 2.00    
  1422.  
  1423. Osiris        cc            Version 2.00    
  1424.  
  1425. DEC PDP-11/?    UNIX V? cc        Version 2.00    EXTENSIVE 
  1426.                             mods to fix 
  1427.                             problems with 
  1428.                             signed chars.
  1429.  
  1430. VAX VMS        cc            Version 2.00    Add #define 
  1431.                             times ttmes to 
  1432.                             fix multiply 
  1433.                             defined symbol 
  1434.                             problem. 
  1435.                             [infocom.h]
  1436.  
  1437. Apple Mac Plus    Lightspeed C 2.01    Version 4.01    The Macintosh 
  1438.                             interface is 
  1439.                             broken for 
  1440.                             THINK C 4.0. 
  1441.                             This is 
  1442.                             currently being 
  1443.                             fixed.
  1444.  
  1445. IBM PC/AT    Microsoft C 6.0a & 7.0    Version 4.01    
  1446.  
  1447. HP-9000/320    HP-UX cc        Version 4.01    
  1448.  
  1449. Apollo DN-4500    SR 10.1 cc        Version 4.01    
  1450.